<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/Css/admin/ui-v1.0.css" rel="stylesheet" type="text/css" media="all">
<script type="text/javascript" src="/js/jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="/js/jquery/jquery-ui-1.8.10.custom.min.js"></script>
<script type="text/javascript" src="/js/admin/v3.2.js"></script>
<script type="text/javascript">
$(function(){
	function reload(){$.loadContent('#topsetlist','TopSetList',{query:location.search.substring(1)})};
	$('#btnReset').click(function(){
		$('#frmTopSet').get(0).reset();
	})
	$('#addchannel').click(function(){
		$.moveOptions('source','target')
	})
	$('#btnTopSetSave').click(function(){
		$.mutiOptions('target');
		$.doCmd('TopSetSave',{query:$('#frmTopSet').serialize(),success:reload});
	})
	$('#removechannel').click(function(){
		$.moveOptions('target',null,0)
	})
	$('#manualAdd').click(function(){
		var channelname = $('#channelname').val();
		$.doCmd('Getchannel',{query:'channel='+encodeURI(channelname),success:function(code,info){
			if($('#target').find('option[value='+info+']').length<=0){
				$('#target').append('<option value="'+info+'">'+channelname+'</option>');	
			}
		}})
	})
	$('#topsetlist .btnDelete').live('click',function(){
		$.doCmd('TopSetRemove',{query:'id='+this.rel,
			success:reload
		});
	});
	$('#batchDelete').live('click',function(){
		$.doCmd('TopSetRemove',
			{checkbox:'id',confirm:true,title:'取消头条文章设置',
				success:reload})
	});
	$('#allselect').live('click',function(){
		var val = this.checked;
		$("input[name='"+this.value+"']").each(function(){if(!this.disabled)this.checked=val;}); 
	})
	$('#f_title').keyup(countTitleLength)
	function countTitleLength(){
		$('#countlength').html($.charLen($('#f_title').val()));
	}
	countTitleLength()
})
</script>
<title>设置头条新闻</title>
</head>

<body class="mainContent">
	<city_list>ArticleView</city_list>
</body>
</html>
